﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RendicionGrupoGrid.ascx.cs" 
Inherits="UILGestion.ObraAdmin.RendicionCaja.RendicionGrupoGrid" %>

<%@ Register src="RendicionCajaGrid.ascx" tagname="RendicionCajaGrid" tagprefix="uc1" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="lib" %>


<input id="idRendicion" type="hidden"  runat="server"/>
<input id="idParent" type="hidden"  runat="server"/>
<input id="idEstado" type="hidden"  runat="server"/>
<input id="igv" type="hidden"  runat="server"/>

<table>
<tr>
<td>  


<asp:UpdatePanel ID="UpdateGrilla" runat="server"  UpdateMode="Conditional">
    <ContentTemplate>
<asp:GridView ID="itemGridView" runat="server"  Width="1000px"
                              AutoGenerateColumns="False" 
                              CellPadding="4" DataKeyNames="idInternal"  
                              SkinID="GridView"
                              ShowHeaderWhenEmpty="true"
                              ShowHeader="false"
                              ShowFooter="true"
                              onrowcancelingedit="CancelItem" 
                            onrowediting="EditItem" 
                            OnRowUpdating="UpdateItem" 
                            OnRowDataBound="itemRowDataBound">
                              <Columns>
                        <asp:TemplateField>
                      
                      <ItemTemplate>
                      
                      <asp:ImageButton ID="imgdiv" runat="server" alt="Click para ver " 
                              BorderColor="Control" ClientIDMode="Static" 
                              CommandArgument="<%# Container.DataItemIndex %>" 
                              CommandName='<%# Eval("idInternal") %>' ImageUrl="../../Images/expand_button.png" 
                              OnClick="MonstrarDetalle" />
                              
                      </ItemTemplate>
                           
                      </asp:TemplateField>


                                  <asp:TemplateField HeaderText="PARTIDA" HeaderStyle-Width="100%" ItemStyle-Width="100%" >
                                      <ItemTemplate>
                                          <asp:Label ID="proyectolbl" runat="server" Text='<%# Eval("descripcion")%>'></asp:Label>
                                       </ItemTemplate>
                                       <EditItemTemplate>
                                          
                                      <asp:TextBox ID="partidaTxt" runat="server"  Text='<%# Eval("descripcion")%>'  Width="100%" />
                                     
                                      </EditItemTemplate>
                                      <FooterTemplate>
                                          
                                      <asp:TextBox ID="partidaTxt" runat="server" Width="100%" />
                                     
                                      </FooterTemplate>
                                     
                                  </asp:TemplateField>

                                  <asp:TemplateField HeaderText="" HeaderStyle-Width="120px" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Right">
                                      <ItemTemplate>
                                          <asp:Label ID="totallbl" runat="server" Text='<%# Eval("totalStr")%>' Width="120px"></asp:Label>
                                       </ItemTemplate>
                                      
                                     
                                  </asp:TemplateField>
                               
                            
 
                                
                                 
<asp:CommandField ButtonType="Image" CancelImageUrl="~/Images/cancel.gif" 
                            EditImageUrl="~/Images/edit.gif" ShowEditButton="true" 
                            UpdateImageUrl="~/Images/update.gif" />

   <asp:TemplateField>
                                      <ItemTemplate>

                                        
                                          <asp:ImageButton ID="lnkRemove" runat="server" BorderColor="Control" 
                                              CommandArgument='<%# Eval("idInternal")%>' ImageUrl="~/Images/delete.gif" 
                                              OnClick="DeleteItem" OnClientClick="return confirm('Usted quiere eliminar?')" />
                                       </ItemTemplate>
                                      <FooterTemplate>

                                       
                                          <asp:Button ID="btnAdd" runat="server"   OnClick="AddItem" 
                                              Text="Añadir" />
                                        
                                      </FooterTemplate>
                                  </asp:TemplateField>                                                                   
                                
                     
  <asp:TemplateField>
    <ItemTemplate >
                                  
    <asp:UpdatePanel ID="UpdateDetalleUpdatePanel" runat="server"  
                                  UpdateMode="Conditional">
                                  <ContentTemplate>
                                  <tr style="left:5px;margin-top:0px;top:0px"    valign="top" >
                                  <td  colspan="100%" >
                                  <asp:Panel ID="divgrillan1" runat="server" 
                                    style="display:none;position:relative;left:5px;margin-top:0px">
                                     
                                         <uc1:RendicionCajaGrid ID="RendicionCajaGrid1" runat="server" />

                                  </asp:Panel>
                                   
                                   </td>
                                   
                                   
                                   </tr>
                                        </ContentTemplate>
                                        </asp:UpdatePanel>
                                   </ItemTemplate>
                                   <ItemStyle Width="0px" />
                                        </asp:TemplateField>

                              </Columns>
  </asp:GridView>
   </ContentTemplate>
   
    </asp:UpdatePanel>
</td>
</tr>
<tr>
<td align="right">
   
</td>
</tr>
</table>
   


   
